package com.kuang.demo.controller.wx;

import com.kuang.demo.bean.BaseRespVo;
import com.kuang.demo.bean.wx.FootPrint;
import com.kuang.demo.mapper.wx.WXFootPrintMapper;
import com.kuang.demo.service.wx.FootPrintService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;

import java.util.List;

@RestController
@RequestMapping("wx/footprint")
public class WXFootprintController {
    @Autowired
    FootPrintService footPrintService;
    @GetMapping("list")
    public BaseRespVo footprintList(int page,int size){
        FootPrint footPrint = new FootPrint();
        List<FootPrint.FootprintListBean> footPrints=footPrintService.footprintList(page,size);
        int total=footPrintService.footprintListPages(size);
        footPrint.setFootprintList(footPrints);
        return BaseRespVo.ok(footPrint);
    }
    @PostMapping("delete")
    public BaseRespVo feedbackDelete(Integer id){
        footPrintService.delete(id);
        return BaseRespVo.ok();
    }
}
